const { app, BrowserWindow } = require("electron");
const {MainWindow} = require('./mainWindow/mainWindow')

// 导入controller模块
require('./controller')
require('./buildMenu')
const createTray = require('./tray')

// app.setPath('userData',path.join(__dirname,'myData'))

app.whenReady().then(() => {
  MainWindow.getInstance()
  createTray(app)
  app.on("activate", () => {
    if (BrowserWindow.getAllWindows().length === 0) createWindow();
  });
});
app.on("window-all-closed", () => {
  if (process.platform !== "darwin") app.quit();
});
